package initialize

import (
	"github.com/gin-gonic/gin"
	"mxshop_api/goods-web/middlewares"
	"mxshop_api/goods-web/router"
)

func Routers() *gin.Engine {

	r := gin.Default()
	r.Use(middlewares.Cors())
	router.InitBaseRouter(r)
	routerGroup := r.Group("/goods/v1")
	router.InitGoodsRouter(routerGroup)
	router.InitBannerRouter(routerGroup)
	router.InitCategoryRouter(routerGroup)
	router.InitBrandsRouter(routerGroup)
	return r
}
